<nz-modal [(nzVisible)]="isVisible" [nzWidth]="modalWidth" (nzOnCancel)="onBack()" [nzStyle]="{'top': '50px'}">
  <div *nzModalTitle>{{ title }}</div>
  <ng-container *nzModalContent>
    <form nz-form class="search-form" [formGroup]="searchForm" (keydown.enter)="$event.preventDefault();onSearch()" nzLayout="inline">
            <nz-form-item>
        <nz-form-label nzFor="facilityName">公共设施名称</nz-form-label>
        <nz-form-control>
          <nz-input-group nzSearch [nzAddOnAfter]="facilityNameSuffixIconButton">
            <input nz-input formControlName="facilityName" placeholder="请选择公共设施名称" readonly />
          </nz-input-group>
          <ng-template #facilityNameSuffixIconButton>
            <button nz-button nzType="primary" nzSearch (click)="findFacility()"><nz-icon nzType="search" /></button>
          </ng-template>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label nzFor="staffName">维修保养人员</nz-form-label>
        <nz-form-control>
          <nz-input-group nzSearch [nzAddOnAfter]="staffNameSuffixIconButton">
            <input nz-input formControlName="staffName" placeholder="请选择维修保养人员" readonly />
          </nz-input-group>
          <ng-template #staffNameSuffixIconButton>
            <button nz-button nzType="primary" nzSearch (click)="findStaff()"><nz-icon nzType="search" /></button>
          </ng-template>
        </nz-form-control>
      </nz-form-item>
      <button nz-button type="button" nzType="primary" [nzLoading]="searchLoading" (click)="onSearch()">查询</button>
      <button nz-button type="button" class="margin-button" (click)="onReset()">重置</button>
    </form>
    <nz-table #basicTable [nzData]="listOfData" [nzTotal]="total" [nzLoading]="searchLoading" nzSize="small">
      <thead>
        <tr>
          <th>公共设施名称</th>
          <th>保养开始时间</th>
          <th>保养开始时间</th>
          <th>维修保养人员</th>
          <th>备注</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let data of basicTable.data" (dblclick)="onRowDblClick(data, $event)">
          <td>{{data.facilityName}}</td>
          <td>{{data.maintenanceStartDate}}</td>
          <td>{{data.maintenanceEndDate}}</td>
          <td>{{data.staffName}}</td>
          <td>{{data.remark}}</td>
        </tr>
      </tbody>
    </nz-table>
  </ng-container>
  <div *nzModalFooter>
    <div class="form-button-container">
      <button nz-button nzType="default" (click)="onBack()">关闭</button>
    </div>
  </div>
</nz-modal>
<facility-selector (facilitySelectedEvent)="handleFacilitySelectedEvent($event)"></facility-selector>
<staff-selector (staffSelectedEvent)="handleStaffSelectedEvent($event)"></staff-selector>
